<?php

namespace app\common\model;

use think\Model;
use app\common\model\Purchaser;
use app\common\logic\MallLogic;
class Score extends Model
{
    //
    protected $autoWriteTimestamp =true;
    protected $type = [
        
        'create_time'  =>  'timestamp:Y/m/d H:i:s',
        'update_time'  =>  'timestamp:Y/m/d H:i:s',
    
    ];
    
    public function img(){
        return $this->hasMany('ScoreImg','score_id','id');
    }
    
    public function user(){
        return $this->hasOne('Member','id','user_id')->field('id,nickname,headimgurl');
    }
    

    
}
